import Vue from 'vue'
import VueRouter from 'vue-router'

import Login from '../views/Login'
import Home from '../views/Home'
import EmpBasic from "../views/emp/EmpBasic";
import EmpAdv from "../views/emp/EmpAdv";
import PerEc from "../views/per/PerEc";
import PerEmp from "../views/per/PerEmp";
import PerMv from "../views/per/PerMv";
import PerSalary from "../views/per/PerSalary";
import PerTrain from "../views/per/PerTrain";
import SalSob from "@/views/sal/SalSob";
import SalSobcfg from "@/views/sal/SalSobcfg";
import SalTable from "@/views/sal/SalTable";
import SalMonth from "@/views/sal/SalMonth";
import SalSearch from "@/views/sal/SalSearch";
import Study from "@/views/stu/Study";
import StaAll from "@/views/sta/StaAll";
import StaPers from "@/views/sta/StaPers";
import StaRecord from "@/views/sta/StaRecord";
import StaScore from "@/views/sta/StaScore";
import SysAdmin from "@/views/sys/SysAdmin";
import SysBasic from "@/views/sys/SysBasic";
import SysCfg from "@/views/sys/SysCfg";
import SysData from "@/views/sys/SysData";
import SysLog from "@/views/sys/SysLog";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Login',
        component: Login,
        Login: true
    },
    {
        path: '/home',
        name: '学生管理',
        icon: 'el-icon-user-solid',
        //import Home from '../views/Home'
        //index.js 上面 从 Home 界面 export default (导出) 中 import 导入的组件
        component: Home,
        //在Home组件下跳转的组件，是Home的子组件
        children: [
            {
                path: '/emp/basic',
                name: '基本资料',
                component: EmpBasic
            },
            {
                path: '/emp/adv',
                name: '高级资料',
                component: EmpAdv
            }
        ]
    },
    {
        path: '/home',// 访问路径，浏览器url上的路径
        name: '作业布置',// 前端展示的名字
        icon: 'el-icon-document',

        //import Home from '../views/Home'
        //index.js 上面 从 Home 界面 export default (导出) 中 import 导入的组件
        component: Home,// 实际组件页面
        //在Home组件下跳转的组件，是Home的子组件
        children: [
            {
                path: '/per/ec',
                name: '员工奖惩',
                component: PerEc
            },
            {
                path: '/per/emp',
                name: '员工资料',
                component: PerEmp
            },
            {
                path: '/per/train',
                name: '员工培训',
                component: PerTrain
            },
            {
                path: '/per/salary',
                name: '员工调薪',
                component: PerSalary
            },
            {
                path: '/per/mv',
                name: '员工调动',
                component: PerMv
            }
        ]
    },
    {
        path: '/home',// 访问路径，浏览器url上的路径
        name: '打分情况',// 前端展示的名字
        icon: 'el-icon-check',
        //import Home from '../views/Home'
        //index.js 上面 从 Home 界面 export default (导出) 中 import 导入的组件
        component: Home,// 实际组件页面
        //在Home组件下跳转的组件，是Home的子组件
        children: [
            {
                path: '/sal/sob',
                name: '工资账套管理',
                component: SalSob
            },
            {
                path: '/sal/sobcfg',
                name: '员工账套设置',
                component: SalSobcfg
            },
            {
                path: '/sal/table',
                name: '工资表管理',
                component: SalTable
            },
            {
                path: '/sal/month',
                name: '月末处理',
                component: SalMonth
            },
            {
                path: '/sal/select',
                name: '工资表查询',
                component: SalSearch
            }
        ]
    },
    {
        path: '/home',// 访问路径，浏览器url上的路径
        name: '统计管理',// 前端展示的名字
        icon: 'el-icon-s-data',
        //import Home from '../views/Home'
        //index.js 上面 从 Home 界面 export default (导出) 中 import 导入的组件
        component: Home,// 实际组件页面
        //在Home组件下跳转的组件，是Home的子组件
        children: [
            {
                path: '/sta/all',
                name: '综合信息统计',
                component: StaAll
            },
            {
                path: '/sta/pers',
                name: '人事信息统计',
                component: StaPers
            },
            {
                path: '/sta/record',
                name: '人事记录统计',
                component: StaRecord
            },
            {
                path: '/sta/score',
                name: '员工积分统计',
                component: StaScore
            }
        ]
    },
    {
        path: '/home',// 访问路径，浏览器url上的路径
        name: '系统管理',// 前端展示的名字
        icon: 'el-icon-menu',//el-icon-s-claim
        //import Home from '../views/Home'
        //index.js 上面 从 Home 界面 export default (导出) 中 import 导入的组件
        component: Home,// 实际组件页面
        //在Home组件下跳转的组件，是Home的子组件
        children: [
            {
                path: '/sys/admin',
                name: '操作员管理',
                component: SysAdmin
            },
            {
                path: '/sys/basic',
                name: '基础信息设置',
                component: SysBasic
            },
            {
                path: '/sys/cfg',
                name: '系统管理',
                component: SysCfg
            },
            {
                path: '/sys/data',
                name: '备份恢复数据库',
                component: SysData
            },
            {
                path: '/sys/log',
                name: '操作日志管理',
                component: SysLog
            }
        ]
    },
    {
        path: '/home',// 访问路径，浏览器url上的路径
        name: '作业管理',// 前端展示的名字
        icon: 'el-icon-edit',
        //import Home from '../views/Home'
        //index.js 上面 从 Home 界面 export default (导出) 中 import 导入的组件
        component: Home,// 实际组件页面
        student: true,
        //在Home组件下跳转的组件，是Home的子组件
        children: [
            {
                path: '/stu/study',
                name: '作业记录',
                component: Study
            }
        ]
    }


]


const router = new VueRouter({
    routes
})

export default router
